package com.xbongbong.paas.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotNull;

/**
 * @author: 徐斌
 * @date: 2020/4/15 15:20
 * @desrcption: 评论删除
 */
@Getter
@Setter
@ToString
public class CommentDeleteDTO extends BaseDTO {

    private static final long serialVersionUID = 8197076057638905031L;

    @NotNull(message = "dto.msg.commentDetail.dataId.NotNull")
    private Long commentId;

    @NotNull(message = "{dto.msg.commentAdd.appId.NotNull}")
    private Long appId;
    /**
     * 引用id
     */
    @NotNull(message = "{dto.msg.commentAdd.refId.NotNull}")
    private Long refId;

    /**
     * 业务类型 {@link com.xbongbong.saas.enums.BusinessCommentEnum}
     * 目前支持五种 APPROVAL(审批) CUSTOMER_COMMUNICATE(跟进记录)
     * SUPPLIER_COMMUNICATE(供应商跟进记录) WORK_REPORT(工作报告) WORK_ORDER(工单)
     */
    @NotNull(message = "{dto.msg.commentAdd.businessType.NotNull}")
    private Integer businessType;

    /**
     * 工单业务类型时指定是工单动态删除（0）还是工单评论删除（1）
     */
    private Integer subType;
    private Integer saasMark;

    /**
     * 是否是回复型评论
     */
    private Boolean isReply;

    public Boolean isReply() {
        if (this.isReply == null){
            return false;
        }
        return this.isReply;
    }
}
